//
//  CJjplistM.swift
//
//  Created by 邱仙凯 on 2022/4/12
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public struct CJjplistM: Mappable {

  // MARK: Declaration for string constants to be used to decode and also serialize.
  private struct SerializationKeys {
    static let zUnitNm = "z_unit_nm"
    static let zPigType = "z_pig_type"
    static let zAddress = "z_address"
    static let zTitle = "z_title"
    static let zDeptId = "z_dept_id"
    static let zEndDate = "z_end_date"
    static let zProvince = "z_province"
    static let zOrgNm = "z_org_nm"
    static let zDateEnd = "z_date_end"
    static let zRecordNo = "z_record_no"
    static let zOrgId = "z_org_id"
    static let idKey = "id_key"
    static let zAvgWeight = "z_avg_weight"
    static let zDeptNm = "z_dept_nm"
    static let zDate = "z_date"
    static let zGoodsNm = "z_goods_nm"
    static let zTel = "z_tel"
    static let rowNum = "row_num"
    static let zPrice = "z_price"
    static let zLeastNum = "z_least_num"
    static let zCity = "z_city"
    static let zBeginDate = "z_begin_date"
    static let zName = "z_name"
    static let zNum = "z_num"
    static let zRange = "z_range"
    static let zZq = "z_zq"
      static let zCreateTm = "z_create_tm"
      static let zZcNm = "z_zc_nm"
      static let zZcId = "z_zc_id"

  }

  // MARK: Properties
  public var zUnitNm: String?
  public var zPigType: String?
  public var zAddress: String?
  public var zTitle: String?
  public var zDeptId: String?
  public var zEndDate: String?
  public var zProvince: String?
  public var zOrgNm: String?
  public var zDateEnd: String?
  public var zRecordNo: String?
  public var zOrgId: String?
  public var idKey: Int?
  public var zAvgWeight: String?
  public var zDeptNm: String?
  public var zDate: String?
  public var zGoodsNm: String?
  public var zTel: String?
  public var rowNum: Int?
  public var zPrice: String?
  public var zLeastNum: Int?
  public var zCity: String?
  public var zBeginDate: String?
  public var zName: String?
  public var zNum: Int?
  public var zRange: Int?
  public var zZq: String?
    public var zCreateTm: String?
    public var zZcNm: String?
    public var zZcId: String?

    
  // MARK: ObjectMapper Initializers
  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public init?(map: Map){

  }

  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public mutating func mapping(map: Map) {
    zUnitNm <- map[SerializationKeys.zUnitNm]
    zPigType <- map[SerializationKeys.zPigType]
    zAddress <- map[SerializationKeys.zAddress]
    zTitle <- map[SerializationKeys.zTitle]
    zDeptId <- (map[SerializationKeys.zDeptId],StringTransform())
    zEndDate <- map[SerializationKeys.zEndDate]
    zProvince <- map[SerializationKeys.zProvince]
    zOrgNm <- map[SerializationKeys.zOrgNm]
    zDateEnd <- map[SerializationKeys.zDateEnd]
    zRecordNo <- map[SerializationKeys.zRecordNo]
    zOrgId <- (map[SerializationKeys.zOrgId],StringTransform())
    idKey <- map[SerializationKeys.idKey]
    zAvgWeight <- map[SerializationKeys.zAvgWeight]
    zDeptNm <- map[SerializationKeys.zDeptNm]
    zDate <- map[SerializationKeys.zDate]
    zGoodsNm <- map[SerializationKeys.zGoodsNm]
    zTel <- map[SerializationKeys.zTel]
    rowNum <- map[SerializationKeys.rowNum]
    zPrice <- (map[SerializationKeys.zPrice],StringTransform_test())
    zLeastNum <- map[SerializationKeys.zLeastNum]
    zCity <- map[SerializationKeys.zCity]
    zBeginDate <- map[SerializationKeys.zBeginDate]
    zName <- map[SerializationKeys.zName]
    zNum <- map[SerializationKeys.zNum]
    zRange <- map[SerializationKeys.zRange]
    zZq <- map[SerializationKeys.zZq]
      zCreateTm <- map[SerializationKeys.zCreateTm]
      zZcNm <- map[SerializationKeys.zZcNm]
      zZcId <- (map[SerializationKeys.zZcId],StringTransform())

      
    }

  /// Generates description of the object in the form of a NSDictionary.
  ///
  /// - returns: A Key value pair containing all valid values in the object.
  public func dictionaryRepresentation() -> [String: Any] {
    var dictionary: [String: Any] = [:]
    if let value = zUnitNm { dictionary[SerializationKeys.zUnitNm] = value }
    if let value = zPigType { dictionary[SerializationKeys.zPigType] = value }
    if let value = zAddress { dictionary[SerializationKeys.zAddress] = value }
    if let value = zTitle { dictionary[SerializationKeys.zTitle] = value }
    if let value = zDeptId { dictionary[SerializationKeys.zDeptId] = value }
    if let value = zEndDate { dictionary[SerializationKeys.zEndDate] = value }
    if let value = zProvince { dictionary[SerializationKeys.zProvince] = value }
    if let value = zOrgNm { dictionary[SerializationKeys.zOrgNm] = value }
    if let value = zDateEnd { dictionary[SerializationKeys.zDateEnd] = value }
    if let value = zRecordNo { dictionary[SerializationKeys.zRecordNo] = value }
    if let value = zOrgId { dictionary[SerializationKeys.zOrgId] = value }
    if let value = idKey { dictionary[SerializationKeys.idKey] = value }
    if let value = zAvgWeight { dictionary[SerializationKeys.zAvgWeight] = value }
    if let value = zDeptNm { dictionary[SerializationKeys.zDeptNm] = value }
    if let value = zDate { dictionary[SerializationKeys.zDate] = value }
    if let value = zGoodsNm { dictionary[SerializationKeys.zGoodsNm] = value }
    if let value = zTel { dictionary[SerializationKeys.zTel] = value }
    if let value = rowNum { dictionary[SerializationKeys.rowNum] = value }
    if let value = zPrice { dictionary[SerializationKeys.zPrice] = value }
    if let value = zLeastNum { dictionary[SerializationKeys.zLeastNum] = value }
    if let value = zCity { dictionary[SerializationKeys.zCity] = value }
    if let value = zBeginDate { dictionary[SerializationKeys.zBeginDate] = value }
    if let value = zName { dictionary[SerializationKeys.zName] = value }
    if let value = zNum { dictionary[SerializationKeys.zNum] = value }
    if let value = zRange { dictionary[SerializationKeys.zRange] = value }
    if let value = zZq { dictionary[SerializationKeys.zZq] = value }
      if let value = zZcNm { dictionary[SerializationKeys.zZcNm] = value }
      if let value = zZcId { dictionary[SerializationKeys.zZcId] = value }

      
    return dictionary
  }

}
